package util;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class WindowUtilities {
	public static JFrame getFrame(){
		JFrame frame = new JFrame();
		frame.setVisible(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		return frame;
	}
	
	public static JFrame getFrameWithPanel(JPanel panel){
		JFrame frame = getFrame();
		frame.getContentPane ().add (panel); //Adding panel to frame.
		frame.pack();
		return frame;
	}
	
	public static void main(String [] args){
		WindowUtilities.getFrame();
	}
}
